﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Google1.aspx.cs" Inherits="repeater_Google1" %>

<%@ Register Assembly="zoyobar.shared.panzer.JQueryElement" Namespace="zoyobar.shared.panzer.ui.jqueryui.plusin"
	TagPrefix="je" %>
<%@ Register Assembly="zoyobar.shared.panzer.JQueryElement" Namespace="zoyobar.shared.panzer.web.jqueryui"
	TagPrefix="je" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title>像 Google 一样</title>
	<link rel="stylesheet" type="text/css" href="../css/smoothness/jquery-ui-1.8.15.custom.css" />
	<script type="text/javascript" src="../js/jquery-1.6.2.min.js"></script>
	<script type="text/javascript" src="../js/jquery-ui-1.8.15.custom.min.js"></script>
	<link rel="stylesheet" type="text/css" href="../css/main.css" />
	<style type="text/css">
		.result
		{
			clear: both;
		}
		.url
		{
			color: Green;
		}
		.updated-date
		{
			color: Gray;
		}
		.picture
		{
			float: right;
		}
		.picture .button
		{
			width: 40px;
		}
		.picture .remark
		{
			padding: 10px;
			display: none;
		}
		#pageindex
		{
			color: #009900;
			width: 20px;
		}
		.footer
		{
			clear: both;
			margin-top: 20px;
		}
	</style>
</head>
<body>
	<form id="formGoogle1" runat="server">
	<div class="title purple-title">
		像 Google 一样
		<iframe src="../about.htm" frameborder="0" height="160" width="100%" allowtransparency="true" scrolling="no"></iframe>
	</div>
	<div class="content">
		<h2>
			说明
		</h2>
		<blockquote>
			如果需要使用 Access 数据库, 请注释掉 repeater_webservice.cs 文件中的 #define XML.<br />
			<br />
			<strong>视频解说:</strong> <a href="http://www.tudou.com/programs/view/uVx2BBMHgOQ/"
				target="_blank">www.tudou.com/programs/view/uVx2BBMHgOQ/</a>
		</blockquote>
		<h2>
			示例
		</h2>
		<blockquote>
			<div id="list">
				<je:Repeater ID="googleRepeater" runat="server" Selector="'#list'" PageSize="2" IsVariable="true"
					FillAsync-Url="webservice.asmx" FillAsync-MethodName="SearchGoogle">
					<ItemTemplate>
						<div class="result">
							<div class="picture">
								<div je-button="label='更多';" je-onclick="shiftview,'pictureRepeater','#{url}'" class="button">
								</div>
								<div je-id="pictureRepeater" class="remark">
								</div>
							</div>
							<h3>
								<a href="#{url}" target="_blank">#{title}</a>
							</h3>
							<div>
								<span class="url">#{url}</span> - <a href="#" onclick="javascript:alert('暂时没有');">网页快照</a>
							</div>
							<div>
								<span class="updated-date">#{updateddate,jQuery.panzer.formatDate(#,'yyyy年M月d日')}</span>
								#{remark}
							</div>
						</div>
					</ItemTemplate>
					<FooterTemplate>
						<div class="footer">
							<a id="prev" href="#" je-onclick="prev">上一页</a>&nbsp;&nbsp;<a id="next" href="#"
								je-onclick="next">下一页</a>,&nbsp; 第 @{pageindex}/@{pagecount} 页, 共 @{itemcount}
							条, <a href="#" je-onclick="goto,new Number(jQuery('#pageindex').val())">跳转</a> 到第&nbsp;<input
								type="text" id="pageindex" value="@{pageindex}" />&nbsp;页.
						</div>
					</FooterTemplate>
				</je:Repeater>
			</div>
			<je:Repeater ID="pictureRepeater" runat="server" FilterField="['url']" FillAsync-Url="webservice.asmx"
				FillAsync-MethodName="GetGooglePicture">
				<ItemTemplate>
					<div>
						<span class="url">#{url}</span>
						<br />
						<br />
						#{picture}
					</div>
				</ItemTemplate>
			</je:Repeater>
		</blockquote>
	</div>
	</form>
</body>
</html>
<script type="text/javascript">
	$(function () {
		googleRepeater.__repeater('fill');
	});
</script>
